package com.annotation.proxy.fastclass;

/**
 * @author: qiuli
 * @date: 2022/1/19 15:01
 * @description:
 */


public class CatProxy {

    public int getIndex(String signature) {
        switch (signature.hashCode()) {
            case 3078479:
                return 1;
            case 3108270:
                return 2;
        }
        return -1;
    }

    public Object invoke(int index, Object o, Object[] args) {
        Cat cat = (Cat) o;
        switch (index) {
            case 1:
                cat.f();
                return null;
            case 2:
                cat.g();
                return null;

        }
        return null;
    }

}
